import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/views/Login.vue'

Vue.use(VueRouter)

const routes = [
  { path: '/login', component: Login },
  // 此处使用懒加载:
  { path: '/reg', component: () => import('@/views/Reg.vue') },
  // 使用 / 当前后台首页
  { path: '/', component: () => import('@/views/Main.vue') }
]

const router = new VueRouter({
  routes
})

export default router
